import express from 'express';
import { login, getUserInfo, updateUserInfo } from '../controllers/userController';
import { auth } from '../middleware/auth';

const router = express.Router();

// 公开路由
router.post('/login', login);

// 需要认证的路由
router.get('/user/info', auth, getUserInfo);
router.put('/user/info', auth, updateUserInfo);

export default router; 